Skip to content

Conversation

@stevencl840
Copy link

@stevencl840 stevencl840 commented Dec 10, 2025

Context

We want to capture the output of pre-receive hooks so that we can display this information to our users. Currently, if a pre-receive hook declines a push, the status error "pre-receive hook declined on branch" is returned. The output of the hook itself is not returned. This additional information is conveyed through remote progress messages and is useful to the user in determining why the hook declined the push.

Details

To achieve this, we need to wire up the OnPushRemoteProgress handler. The NativeMethods for receiving text updates from the remote already exist and are used in the FetchOptions. This simply adds the existing handler to PushOptions, allowing you to configure a callback for receiving text updates from the remote.

This PR effectively brings the work in libgit2#1876 to our fork.

@stevencl840 stevencl840 changed the base branch from master to octopus/master December 10, 2025 21:04
@stevencl840 stevencl840 force-pushed the sjc/add-progress-callback branch 2 times, most recently from e845b47 to 982aeba Compare December 12, 2025 06:10
@stevencl840 stevencl840 force-pushed the sjc/add-progress-callback branch from 982aeba to d7d187c Compare December 12, 2025 06:11
@stevencl840 stevencl840 requested a review from a team January 9, 2026 05:07
@stevencl840 stevencl840 marked this pull request as ready for review January 9, 2026 05:07
@stevencl840 stevencl840 changed the title Add in progress callbacks Add Push progress callbacks Jan 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants